package com.glodon.paas.account.dao.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.glodon.paas.account.dao.domain.UserEntity;

public interface UserEntityMapper {
    int deleteByPrimaryKey(String id);

    //int insert(UserEntity record);

    int insertSelective(UserEntity record);

    UserEntity selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(UserEntity record);

    int updateByPrimaryKey(UserEntity record);

//	List<UserEntity> selectByEmail(
//			@Param("email")String email, 
//			@Param("status")Integer status
//			);

	int updateByPrimaryKeyMap(Map<String, Object> param);

	List<UserEntity> selectByWhereAnd(Map<String, Object> param);

	/**
	 * @param userIds
	 * @return
	 */
	List<UserEntity> selectByPrimaryKeys(
			@Param("ids")String[] ids
			);

    void addProjectRole(@Param("id") String id,@Param("userId") String userId,@Param("projectId") String projectId,@Param("roleId") String roleId,@Param("orgId") String orgId);
    int deleteProjectRole(@Param("userId") String userId,@Param("projectId") String projectId,@Param("roleId") String roleId,@Param("orgId") String orgId);
    int updateProjectRole(@Param("projectId")String projectId, @Param("oldRoleId")String oldRoleId,@Param("newRoleId")String newRoleId);
}
